package com.kingyun.gpsinspection.purificationservice.services.tdm.outerservice.impl;

import com.kingyun.gpsinspection.purificationservice.facade.model.tdm.Task;
import com.kingyun.gpsinspection.purificationservice.facade.model.tdm.WorkOrder;
import com.kingyun.gpsinspection.purificationservice.facade.service.tdm.OutTaskWebService;
import com.kingyun.gpsinspection.purificationservice.facade.service.tdm.TaskService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * Created by sugongche on 2017/3/28.
 */
public class OutTaskWebServiceImpl implements OutTaskWebService {
    private Logger logger = LoggerFactory.getLogger(this.getClass());
    @Autowired
    private TaskService taskService;

    @Override
    public String saveAutonomicTask(Task task, WorkOrder workOrder) {
        String workOrderId = "";
        try {
            workOrderId = taskService.saveAutonomicTask(task, workOrder);
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
        }

        return workOrderId;
    }
}
